package com.shanzmoo.db.module.merchant.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.shanzmoo.db.module.member.entity.MemberInfoEntity;
import com.shanzmoo.db.module.merchant.entity.MerchantInfoEntity;
import com.shanzmoo.db.module.merchant.mapper.MerchantInfoMapper;
import com.shanzmoo.db.module.merchant.service.IMerchantInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 入驻商户 服务实现类
 * </p>
 *
 * @author zfj
 * @since 2021-04-17
 */
@Service
public class MerchantInfoServiceImpl extends ServiceImpl<MerchantInfoMapper, MerchantInfoEntity> implements IMerchantInfoService {

    @Override
    public MerchantInfoEntity getByMerchantCode(String merchantCode) {
        return getOne(
                new LambdaQueryWrapper<MerchantInfoEntity>()
                .eq(MerchantInfoEntity::getCode,merchantCode)
        );
    }
}
